package com.art.coconut.example.model;

import com.art.coconut.annotation.*;
import com.art.coconut.enums.PropertyTypeEnum;
import lombok.Data;

import java.util.List;

@Data
@EntityTag("BUSINESS")
public class Business {
    @PropertyField("业务基本信息ID")
    @UnionId
    private String id;
    @PropertyField("业务基本信息编号")
    private String bizNum;
    @CollectionFlag(value = PropertyTypeEnum.LIST_TYPE)
    List<BusinessDetail> businessDetailList;

    public static Business build(String id, String bizNum){
        Business business = new Business();
        business.setId(id);
        business.setBizNum(bizNum);
        return business;
    }
}
